{{/* https://gohugo.io/hugo-pipes/bundling/ */}}

{{ $concatPath := .concatPath }}
{{ $targetPath := .targetPath }}

{{ $bundle := resources.Match $concatPath | resources.Concat $targetPath }}

{{ if hugo.IsProduction }}
    {{ $bundle = $bundle | resources.Minify }}
{{ end }}

{{ return ($bundle.Permalink | relURL) }}